Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Case sensitivity



  Some thoughts about microservice adoption

Nowadays microservice is very popular among companies with the increasing complexity of systems. The goal is to make each microservice to handle one specific job and handle it well. This normally would provide the benefit of maintaining the service easily and isolating errors and making the service more reliable and scalable. The benefits of adopting microservice are obvious. Maintainability. Decouple functions so that each function can be maintained separately which reduces the risk of issue ...

   ADVANTAGE,DISADVANTAGE,MICRO SERVICE     2020-09-05 01:25:05

  Service discovery with etcd

In previous post, we have talked about etcd and its usage. This post we will cover how to implement server discovery with etcd. Service discovery is to solve one of the most commonly seen scenarios in distributed system where how to find the corresponding target service to talk to. In short, it is to find some server which one can talk to based on some service name. A complete service discovery system include below three key functions: Service registration: A service must register itself to so...

   ETCD,SERVICE DISCOVERY,DEMO,TUTORIAL     2021-03-08 05:36:29

  Data as code

What is a good command line parser API? A good command line parser should consider below 5 aspects: Support convenient help information generation Support sub commands, for example, git has push,pull,commit sub commands. Support single character option, word option, flag option and option with parameter. Support default option, for example, if no -port is set, set it as 5037 Support usage model, for example, tar's -c and -x is mutually exclusive, they belong to different usage models. Here are...

   Command line,API     2013-08-08 22:40:36

  TikTok confirms to sue US government

TikTok confirmed on Saturday to sue US government and US president Donald Trump over Trump administration's executive order on potentially banning TikTok in US. This Chinese short video app is the most downloaded app on App Store and PlayStore over past few months and has gained extremely high popularity among American youths. The parent company ByteDance claimed that the government's ban is illegal and hurts the interests of America people. "Even though we strongly disagree with the administra...

   BYTEDANCE,TIKTOK,US GOVERNMENT     2020-08-22 22:27:29

  Pandora's killer--iTunes Radio

As expected, this year's WWDC may make many people happy, but also doomed to make many start-up companies sleepless. iTunes Radio is such a product creates insomnia. In WWDC, iTunes Radio was released on schedule and it becomes Apple's new music service. iTunes Radio is a music stream service which can learn your taste, it can recommend your music based on what you heard and you're listening to. From the conference we can see this new service can access the entire iTunes catalog, i.e, there wil...

   iTunes Radio,iRadio,Apple     2013-06-10 23:19:23

  Undefined property or variable in JavaScript

JavaScript is a weak type language, and also you can use a variable or property where it's undefined. If we don't have correct ways to check whether a property or variable is defined, we may get unexpected results when we try to access the,. How can we check whether a property or variable is undefined? This is actually a somewhat tricky question. Let's start off with some facts about undefined and then see what kind of function is consistent with the ones we care about. JavaScript attaches type...

   Property,Undefined,Array,JavaScript     2014-07-24 06:56:07

  Supervisord, God and Monit, which one to choose?

With the popularity of Docker, more and more service have been moved into docker containers and they are easy to build up and maintain for each atomic service(though it's a bit complex to maintain multiple docker containers which contain different service to form a complete solution). Ideally, each docker container should only contain one service which has only one running process. However, in reality there would be cases multiple processes would run in one single docker container and there is a...

   DEVOPS,MONIT,SUPERVISORD,GOD,DOCKER     2017-11-25 12:28:11

  Regular expression to get html meta description

When we need to process a HTML page source code, we often need to retrieve the meta description of the page besides the links in the page. This description is usually located in <meta> tag of a HTML page. The meta description is very useful for search engine index. How can we retrieve the meta description? If we use a regular expression, we can easily get the meta description. In JavaScript, the regular expression looks like : var pattern = /<meta.*?name="description".*?content="(.*?)"....

   Regular expression,meta description,HTML,JavaScript     2012-07-03 10:09:20

  Samsung loses $12.3 billion in one day

Following the court decision last Friday on Samsung's infringement of Apple's patents, Apple did not stop, they immediately submitted an application to the court to ban some Samsung smartphones, including 8 types of Samsung smartphones sold in United States. Apple listed in detail in the document what patents these phones infringed. These 8 smartphones are: Galaxy S 4G Galaxy S2 (AT&T) Galaxy S2 (Skyrocket) Galaxy S2 (T-Mobile) Galaxy S2 Epic 4G Galaxy S Showcase Droid Charge Galaxy Prevail...

   Samsung,Apple,Patent,Lose     2012-08-27 21:37:24

  Overlap Detection

How does one detect when two strings overlap? In the case below, the four-letter suffix of string 1 matches the four-letter prefix of string 2. 1: "Fire at Will" 2: "William Riker is number one" Sometimes there are several matches; finding the longest is not always straight forward. 1: "Have some CoCo and CoCo" 2: "CoCo and CoCo is here." 2: "CoCo and CoCo is here." 2: "CoCo and CoCo is here." The naïve solution is to take...

   String overlap,detection,python,implementation     2012-03-05 05:05:36